package com.jm;

import com.jm.utils.Utils;
import com.jm.web.data.Mail;

public class JMThread extends Thread{
	private int index = 0;
	private Mail mail = null;
	public JMThread(Mail mail,int index) {
		this.mail = mail;
		this.index = index;
	}
	
	@Override
	public void run() {
		Utils utils = new Utils(null);
		if(this.mail != null){
			try {
				utils.sendMail(mail);
			} catch (Exception e) {
				e.printStackTrace();
				System.out.println("线程"+index+"异常!");
				return;
			}
			System.out.println("线程"+index+"已发!");
		}
	}
	
}
